checkLogin();

scorllInit();
//水票列表
var success = function (res) {
	var info = res.data;
	var html = template('bill_list',info);
	$('#item1mobile').append(html);

}
getData(member_bill_list,comParams(),success);

//水票明细
fenye_options.url = member_bill_record;
fenye_options.dataName = 'record_list';



function scorllInit() {
    var info = getScreen();
    var slider_height = parseInt($(".mui-slider").height());
    var category_height = parseInt($("#segmentedControl").height());
    var bar_height = parseInt($(".mui-bar").height());
    var scroll_height = info[1] - slider_height - category_height - bar_height + 'px';
    fenye_options.scrollHeight = scroll_height; //设置分页滚轴高度（自适应）
    mui('.mui-control-content').each(function() {
        this.style.height = scroll_height;
    });
    mui('.mui-scroll-wrapper').each(function(k, v) {
        mui(v).scroll({
            deceleration: (mui.os.ios ? 0.003 : 0.0006),
            indicators: false  //隐藏一条滚动条 增大减速系数。。。
        });
    });
}

/*mui.init();
			(function($) {
				//阻尼系数
				var deceleration = mui.os.ios?0.003:0.0009;
				$('.mui-scroll-wrapper').scroll({
					bounce: false,
					indicators: true, //是否显示滚动条
					deceleration:deceleration
				});
				$.ready(function() {
					//循环初始化所有下拉刷新，上拉加载。
					$.each(document.querySelectorAll('.mui-slider-group .mui-scroll'), function(index, pullRefreshEl) {
						$(pullRefreshEl).pullToRefresh({
							down: {
								callback: function() {
									var self = this;
									setTimeout(function() {
										var ul = self.element.querySelector('.mui-table-view');
										ul.insertBefore(createFragment(ul, index, 10, true), ul.firstChild);
										self.endPullDownToRefresh();
									}, 1000);
								}
							},
							up: {
								callback: function() {
									var self = this;
									setTimeout(function() {
										var ul = self.element.querySelector('.mui-table-view');
										ul.appendChild(createFragment(ul, index, 5));
										self.endPullUpToRefresh();
									}, 1000);
								}
							}
						});
					});
					var createFragment = function(ul, index, count, reverse) {
						var length = ul.querySelectorAll('li').length;
						var fragment = document.createDocumentFragment();
						var li;
						for (var i = 0; i < count; i++) {
							li = document.createElement('li');
							li.className = 'mui-table-view-cell';
							li.innerHTML = '第' + (index + 1) + '个选项卡子项-' + (length + (reverse ? (count - i) : (i + 1)));
							fragment.appendChild(li);
						}
						return fragment;
					};
				});
			})(mui);*/
